<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <title>登录 - 购车咨询</title>
    <link rel="stylesheet" th:href="@{/css/style.css}" />
</head>
<body>
<div class="container">
    <h1>登录</h1>
    <form th:action="@{/login}" method="post">
        <div class="field"><label>用户名</label><input type="text" name="username" /></div>
        <div class="field"><label>密码</label><input type="password" name="password" /></div>
        <div><button type="submit" class="btn">登录</button></div>
    </form>
    <p>还没有账号？<a href="/register">注册</a></p>
    <p th:if="${param.error}">登录失败，请检查用户名或密码。</p>
    <p th:if="${param.logout}">您已退出登录。</p>
</div>
</body>
</html>